#pragma once
/***********************************************************
! @File        : transtext.h
 *  @Brief       : cpp翻译文案
 *  @Details     : 使用方法 TransString::instance()->helloWord;
 *  @Author      : soda
 *  @Date        : 2023-08-10 15:50:01
 *  @Version     : v1.0
 *  @Copyright   : Copyright By soda, All Rights Reserved
 ***********************************************************/

#include <QObject>
#include <QDebug>

class TransString : public QObject
{
	Q_OBJECT
public:
    static TransString* instance() {
        if( m_trans == nullptr ){
            m_trans = new TransString();
        }
        return m_trans;
    }

    void retranslate(){
        installNow = tr("Install Now");
        agreeFront = tr("I have read and agree to");
        agreeBack = tr("The User License Agreement");
        invalidInstallPath = tr("The installation path is invalid!");
        installRequestPath = tr("Installation Path Required: ");
        available = tr("Available: ");
        browers = tr("Brosers...");
        moreOptions = tr("More Options");
        installing = tr("Installing");
        installOver = tr("Run Now");
        installFailed = tr("Installation failed, please try again!");
        updateFailed =  tr("Application update failed");
        updateTips =  tr("Please try to download and manually install the latest version from");
        updateWebsite =  tr("Anycubic website.");
        updateApplication =  tr("Updating the application...");
        selectDir =  tr("select directory");

        /// messagebox
        messageInstalledStop =  tr("Stop installing Anycubic Phonton Workshop now ?");
        messageInstalledPath =  tr("The installation path already exists.would you like to install to that folder anyway ?");
        messageRunning =  tr("You're using Anycubic Photon Workshop, Please close it and try again.");

        yes =  tr("Yes");
        no =  tr("No");
        ok =  tr("OK");
        cancel =  tr("Cancel");
        continueTips =  tr("Continue");
        teminateTips =  tr("Teminate");

    }

private:
    TransString(){ retranslate(); }
    static TransString *m_trans;

public:
    QString installNow;
    QString agreeFront;
    QString agreeBack;
    QString invalidInstallPath;
    QString installRequestPath;
    QString available;
    QString browers;
    QString moreOptions;
    QString selectDir;

    QString installing;
    QString installOver;
    QString installFailed;

    QString updateFailed;
    QString updateTips;
    QString updateWebsite;
    QString updateApplication;

    QString messageInstalledStop;
    QString messageInstalledPath;
    QString messageInstalled;
    QString messageRunning;

    QString yes;
    QString no;
    QString ok;
    QString cancel;
    QString continueTips;
    QString teminateTips;

};
